package com.boco.blch.dispatcher.util;

import java.net.URL;

import org.dom4j.Document;
import org.dom4j.DocumentException;
import org.dom4j.Element;
import org.dom4j.io.SAXReader;


public class URLPropertiesUtils {
	private static Element config; 
	static {
		SAXReader saxReader = new SAXReader();
		URL url = URLPropertiesUtils.class.getClassLoader().getResource("ipconfig.xml");
		Document document = null;
		try {
			document = saxReader.read(url);
		} catch (DocumentException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}  
		config = document.getRootElement();
	}
	
	public static String getUrlByName(String name){
		return config.elementText(name);
	}
	
	public static String getSingleLoginUrl(){
		return config.elementText("SingleLoginExec_URL"); 
	}
	
	
	

}

